# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-net-server
_realname=Net-Server
pkgver=2.009
pkgrel=2
pkgdesc="Extensible, general Perl server engine"
url="https://metacpan.org/release/Net-Server/"
arch="noarch"
license="Artistic-1.0 GPL+"
depends="perl"
makedepends="perl-dev"
install=
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RH/RHANDOM/$_realname-$pkgver.tar.gz"
builddir="$srcdir/$_realname-$pkgver"

prepare() {
	cd "$builddir"
        export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$builddir"
        export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
        find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="36409f8d2478877c68cbfcbe9c08045b0c24a926b64f022faf3de8f4b4369ff417d5c41ff1e9800553c38da29c6d72ef301119c956cb26439f6b6366ff4b459c  Net-Server-2.009.tar.gz"
